package com.bwie.es;

import com.bwie.pojo.Image;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;
import java.util.List;

@Data
@Document(indexName = "es_product")
public class EsProduct {
    @Id
    @Field(type = FieldType.Integer)
    private Integer id;

    @Field(type = FieldType.Text)
    private String productName;

    @Field(type = FieldType.Text)
    private String productIntro;

    @Field(type = FieldType.Double)
    private double productPrice;

    @Field(type = FieldType.Text)
    private String productNums;

    @Field(type = FieldType.Text)
    private String productDiscount;

    @Field(type = FieldType.Text)
    private String productNumber;


    @Field(type = FieldType.Integer)
    private Integer userId;

    @Field(type = FieldType.Text)
    private String productFirst;

    @Field(type = FieldType.Text)
    private String productSecond;

    @Field(type = FieldType.Text)
    private String productStatus;


    @Field(type = FieldType.Text)
    private String onename;

    @Field(type = FieldType.Text)
    private String twoname;

    @Field(type = FieldType.Text)
    private String username;

    @Field(type = FieldType.Text)
    private String roleName;


    @Field(type = FieldType.Text)
    private String jiage;

    @Field(type = FieldType.Nested)
    private List<Image> imageList;


}
